package cn.ssm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import cn.ssm.dao.StudentMapper;
import cn.ssm.pojo.Student;
import cn.ssm.service.StudentService;

@Service("studentServiceImpl")
public class StudentServiceImpl implements StudentService {

	@Autowired
	@Qualifier("studentMapper")
	private StudentMapper stumapper;
	
	
	@Override
	public int addStudent(Student stu) {
		return stumapper.insertStudent(stu);
	}

	@Override
	public int delStudentByNo(Integer studentNo) {
		return stumapper.delStudentByNo(studentNo);
	}

	@Override
	public int updateStudent(Student stu) {
		return stumapper.updateStudent(stu);
	}

	@Override
	public List<Student> findStudentAll() {
		return stumapper.selectStudentAll();
	}

}
